<?php
    include("scripts.php");
    include("header.php");
    include("left.php");
    include("mid.php");
    include("right.php");
    include("footer.php");
    
    $xtpl_index = new XTemplate("view/index.htm");
    
    $title  = "Thế Giới Sữa - Công ty sữa Việt Nam";
    $module = $_GET['module'];
    switch($module){
        case    'about'             :   include("site/about_us.php"); break;
        case    'register'          :   include("site/member/register.php"); break;
        case    'success'           :   include("site/member/success.php"); break;
        case    'successchange'     :   include("site/member/successchange.php"); break;
        case    'login'             :   include("site/member/login.php"); break;
        case    'logout'            :   include("site/member/logout.php"); break;
        case    'profile'           :   include("site/member/profile.php"); break;
        case    'changepassword'    :   include("site/member/changepassword.php"); break;
        case    'changeprofile'     :   include("site/member/changeprofile.php"); break;
        default                     :   include("site/mid.php"); break;
    }
    
    $xtpl_index -> assign('title', $title);    
    $xtpl_index -> assign('scripts', $scripts);
    $xtpl_index -> assign('header', $header);
    $xtpl_index -> assign('left', $left);
    $xtpl_index -> assign('mid', $mid);
    $xtpl_index -> assign('right', $right);
    $xtpl_index -> assign('footer', $footer);
    $xtpl_index -> parse("INDEX");
    $xtpl_index -> out("INDEX");
?>